package com.wanmait.server.controller;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 系统页面控制器。
 *
 * @ClassName SysPageController
 * @Author 羽
 * @Date 2020/12/820:27
 * @Version 1.0
 **/
@Controller
public class SysPageController extends AbstractController{


    /**
     * 进入登陆界面
     * @Author 羽
     * @Date 2020/12/8  20:28
     * @Version 1.0
     **/
    @RequestMapping("login")
    public String login() {
        if(SecurityUtils.getSubject().isAuthenticated()){
            return "redirect:index";
        }
        return "login";
    }
    /**
     * 登陆成功跳转到主页
     * @Author 羽
     * @Date 2020/12/8  20:21
     * @Version 1.0
     **/
    @RequestMapping({"index","/"})
    public void index() {

    }
    /**
     *@Author 羽
     *@Date 2020/12/8  20:30
     *@Version 1.0
     * 显示主界面。main
    **/
    @RequestMapping("main")
    public void main(){

    }
    /**
     *@Author 羽
     *@Date 2020/12/8  20:31
     *@Version 1.0
     * 进入404错误界面
    **/
    @RequestMapping("404")
    public void notFount(){

    }

    /**
     * TODO
     * @author 羽
     * @date 2020/12/13 16:32
     * 进入modules下的所有操作界面,
     **/
    @RequestMapping("modules/{module}/{page}")
    public void post(@PathVariable String module,@PathVariable String page){

    }
//ceshi
    @RequestMapping("demo")
    public void demo(){

    }



}
